-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Polygon box transform op for OCR East detection. #10802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polygon box transform op for OCR East detection. #10802
Conversation
class QuadTransformOpMaker : public framework::OpProtoAndCheckerMaker { | ||
public: | ||
void Make() override { | ||
AddInput("Input", "The input with shape [batch_size, 8, height, width]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the shape can be more general, do not fix to 8.
namespace paddle { | ||
namespace operators { | ||
|
||
#define GEO_CHANNEL 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in .h can be moved to .cc and .h
can be removed.
places.append(core.CUDAPlace(0)) | ||
# if core.is_compiled_with_cuda() and core.op_support_gpu(self.op_type): | ||
|
||
# places.append(core.CUDAPlace(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to resume the code.
using Tensor = framework::Tensor; | ||
|
||
template <typename DeviceContext, typename T> | ||
class BoxRestoreCPUKernel : public framework::OpKernel<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the name can call:
PolygonBoxTransform ?
1. rename op 2. uncomment unitest on GPU
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the op name in test_polygon_box_transform_op.py in next PR.
reference: EAST: An Efficient and Accurate Scene Text Detector